<{include file="index/header.html"}> 
<script type="text/javascript">
function ajax_add(name,url){  
	parent.dialog(name,url); 
}
function wchat_update(name,url){
	parent.dialog(name,url); 
}
function wchat_del(id){
	if(id == ''){
		alert('删除错误！');
		return false;
	} 
	$.post('?m=wchat&a=auto_news_add_del',{aid:id},function(data){ 
		$("#wchat_"+id).remove();
	});
	
}
</script>
<style type="text/css">
.uq_show_box{ width:300px; height:400px; background:#efefef; float:left;}
.uq_box{ width:300px; float: left;}
.uq_box .img{ width:100px; float:left;}
.uq_box .ttl{ width:180px; float:left;}

</style> 
<{include file="wchat/auto_nav.html"}>
<div class="main">
<form action="#" method="post">
	<input name="id" type="hidden" value="<{$aid}>">
	<table width="100%" class="etable"> 
		<tr>
			<td width="100px">名称：</td>
			<td><input name="name" type="text" size="35" value="<{$row.name}>"><p>必填</p></td>
		</tr>
		<tr>
			<td>绑定事件：</td>
			<td><input name="event_key" type="text" size="35" value="<{$row.event_key}>"><p>必填</p></td>
		</tr> 
		<tr>
			<td>关键字：</td>
			<td><input name="keyword" type="text" size="35" value="<{$row.keyword}>"><p>必填</p></td>
		</tr> 
		<tr>
			<td>&nbsp;</td>
			<td> 
				<table width="500px" class="etable">
<{foreach from=$data key=k item=i}>
				  <tr id="wchat_<{$i.id}>" style=" border:1px solid #efefef; <{if $k != '0'}>border-top:none;<{/if}> float:left;">
					<td width="60px"><a href="javascript:;" style="width:60px; height:60px; overflow:hidden; float:left;"><img src="<{$i.pic_url}>" width="50px"/></a></td>
					<td width="260px" valign="top"><{$i.title}></td>
					<td width="100px">
						<a href="javascript:;" onClick="wchat_update('编辑图文','?m=wchat&a=auto_news_update_box&id=<{$i.id}>');">编辑</a>
						<a href="javascript:;" onClick="wchat_del('<{$i.id}>');">删除</a>
					</td>
				  </tr>
<{/foreach}>
				  <tr>
					<td colspan="3"><a href="javascript:;" onClick="ajax_add('新增图文','?m=wchat&a=auto_news_add_box&aid=<{$aid}>');" style="width:150px; background:#efefef; text-align:center; margin:10px 0 0 0; padding:10px 30px; float:left;">新增一个图文</a></td>
				  </tr>
				</table>   
			</td>
		</tr> 
		<tr>
			<td>&nbsp;</td>
			<td><input name="submit" type="submit" value="保存"></td>
		</tr>
	</table>	 
</form> 
</div>
<{include file="index/footer.html"}> 
